﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class product_insurance_admin_insurance_applicant_list : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       ApplicationBLL app_dal = new ApplicationBLL();
       DataSet applicant_list = app_dal.getAllList();
       gv_applicantList.DataSource = applicant_list;
       gv_applicantList.DataBind();
      
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        GridViewRow row = gv_applicantList.SelectedRow;
        ApplicationBLL app_dal = new ApplicationBLL();
        DataSet applicant_list = app_dal.getAllList();
        gv_applicantList.DataSource = applicant_list;
        gv_applicantList.DataBind();

        if (row.Cells[4].Text.StartsWith("H"))
        {

            Response.Redirect("~/product/insurance/admin/applicant_details_hospital.aspx?applicationID=" + row.Cells[0].Text);

        }
        else
        {
            Response.Redirect("~/product/insurance/admin/applicant_details_accident.aspx?applicationID=" + row.Cells[0].Text);
        }


    
    }
 
    
    
}